<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class PassCardForAdmin extends JsonResource
{
    public function toArray($request)
    {
        return [
            'name' => $this->user->userProfile->name ?? '缺失姓名',
            'phone' => $this->user->userProfile->phone ?? '缺失手机号码',
            'now_address' => $this->user->userProfile->now_address,
            'flow_register_code' => $this->flow_register_code ?? '',
            'pass_card_photo' => $this->pass_card_photo,
        ];
    }
}
